#include "dialogwaveshader.h"
#include "ui_dialogwaveshader.h"

DialogWaveShader::DialogWaveShader(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DialogWaveShader)
{
    ui->setupUi(this);
    this->ui->widget->setSpeed(0);

    QColor c= this->palette().background().color();
    qDebug()<<c.red()<<" "<<c.green()<<" "<<c.blue();
}

DialogWaveShader::~DialogWaveShader()
{
    delete ui;
}

void DialogWaveShader::on_verticalSliderValue_valueChanged(int value)
{
    this->ui->widget->setValue(value/100.);
}

void DialogWaveShader::on_horizontalSlider_valueChanged(int value)
{
    this->ui->widget->setSpeed(-value/100.);
}

void DialogWaveShader::on_horizontalSlider_2_valueChanged(int value)
{
    this->ui->widget->setWaveHeight(value/100.);
}

void DialogWaveShader::on_horizontalSlider_3_valueChanged(int value)
{
    this->ui->widget->setWaveDensity(value/10.);
}

void DialogWaveShader::on_horizontalSlider_5_valueChanged(int value)
{
    this->ui->widget->setPhaseDifference(value/100.);
}

void DialogWaveShader::on_radioButton_clicked()
{
    this->ui->radioButton->setChecked(true);
    this->ui->widget->setBeEllipse(false);
}

void DialogWaveShader::on_radioButton_2_clicked()
{
    this->ui->radioButton_2->setChecked(true);
    this->ui->widget->setBeEllipse(true);
}
